/*
ID:luongho3
LANG:C++
TASK:subset
*/
#include <iostream>
#include <fstream>
#define MAX 400
#define MAX_N 40
using namespace std;
int c[MAX_N][MAX];
ifstream fin("subset.in");
ofstream fout("subset.out");
int N;
int main() {
    fin >> N;
    int i,j;
    int sum = (N+1) * N / 2;
    if (sum % 2==1) {
       fout << "0\n";
    }
    else {
         // init the table
         int half = sum / 2;
         for (i=1;i<=N;++i) {
             c[i][i]=1;
         }
         for (j=N+1;j<=half;++j) {
             c[N][j]=0;
         }
         c[N][N] = 1;
         for (i=N-1;i>=1;--i) {
             for (j=0;j<=half;++j) {
                 if (j<=i) {
                    c[i][j] = 0;
                 }
                 else {
                      c[i][j] = c[i+1][j] + c[i+1][j-i];
                 }
             }
         }
         fout << c[1][half] << "\n";
    }
    return 0;   
}
